import java.util.Random;

import javax.swing.JFrame;

public class Dancing implements Runnable {
	JFrame wind = null;
	Random rd = new Random();

	public JFrame getWind() {
		return wind;
	}

	public void setWind(JFrame wind) {
		this.wind = wind;
	}

	public Dancing(JFrame wind) {
		this.wind = wind;
	}

	public void run() {
		while (true) {
			wind.setLocation(rd.nextInt(100), rd.nextInt(100));
			try {
				Thread.currentThread().sleep(50);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

}
